/*
 * Texture.cpp
 *
 *  Created on: Feb 5, 2010
 *      Author: dcrown
 */

#include "Texture.h"
#include "..\Systems\Logger.h"
#include "DXManager.h"

extern DXManager* gpDX;

void Texture::Clear()
{
	filename = "";
	id = "";
}

void Texture::Destroy()
{
	delete texture;
	texture = NULL;
}

bool Texture::Create(const char* filename, const char* id, int width, int height)
{
	if (gpDX->LoadTexture(filename, &texture, width, height))
	{
		this->filename = filename;
		this->id = id;
		return true;
	}

	return false;
}


//called by game loop
void Texture::Update()
{
}

LPDIRECT3DTEXTURE9 Texture::GetTexture()
{
	return texture;
}
